const moment = require('moment')

module.exports = {
  formatDate (date) {
    if (typeof date === 'object') {
      return moment(date).format('YYYY-MM-DD HH:mm:ss')
    }
    return date
  }
}